<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>下拉菜单</title>
    <link rel="stylesheet" href="../css/bootstrap.min.css">
</head>

<body>
    <div class="container">
        <div class="dropdown">
            <button type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown">
                下拉菜单按钮
            </button>
            <div class="dropdown-menu">
                <a class="dropdown-item" href="#">链接 1</a>
                <a class="dropdown-item" href="#">链接 2</a>
                <a class="dropdown-item" href="#">链接 3</a>
            </div>
        </div>
    </div>
    <br>
    <div class="container">
        <li>
            <hr class="dropdown-divider">
            </hr>
        </li>
    </div>
    <br>
    <div class="container">
        <li>
            <h5 class="dropdown-header">标题 1</h5>
        </li>
    </div>
    <br>
    <div class="container"><a class="dropdown-item" href="#">常规项</a>
        <a class="dropdown-item active" href="#">激活项</a>
        <a class="dropdown-item disabled" href="#">禁用项</a>
    </div>
    <br>
    <div class="container"><!-- 右对齐 -->
        <div class="dropdown dropend">
            ...
        </div>

        <!-- 左对齐 -->
        <div class="dropdown dropstart">
            ...
        </div>
    </div>
    <br>
    <div class="container"><!-- 向上菜单 -->
        <div class="dropup">
            <button type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown">
                下拉菜单
            </button>
            <ul class="dropdown-menu">
                <li><a class="dropdown-item" href="#">链接 1</a></li>
                <li><a class="dropdown-item" href="#">链接 2</a></li>
                <li><a class="dropdown-item" href="#">链接 3</a></li>
            </ul>
        </div>
    </div>
    <br>
    <div class="container"><!-- 左边的下拉菜单 -->
        <div class="dropstart">
          添加一些内容，用于测试向左边弹出效果。<button type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown">
          下拉菜单
          </button>
          <ul class="dropdown-menu">
            <li><a class="dropdown-item" href="#">链接 1</a></li>
            <li><a class="dropdown-item" href="#">链接 2</a></li>
            <li><a class="dropdown-item" href="#">链接 3</a></li>
          </ul>
        </div></div>
    <br>
    <div class="container"><div class="btn-group">
        <button type="button" class="btn btn-primary">Apple</button>
        <button type="button" class="btn btn-primary">Samsung</button>
        <div class="btn-group">
          <button type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown">Sony</button>
          <ul class="dropdown-menu">
            <li><a class="dropdown-item" href="#">Tablet</a></li>
            <li><a class="dropdown-item" href="#">Smartphone</a></li>
          </ul>
        </div>
    </div></div>
    <br>
    <div class="container"><div class="btn-group-vertical">
        <button type="button" class="btn btn-primary">Apple</button>
        <button type="button" class="btn btn-primary">Samsung</button>
        <div class="btn-group">
          <button type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown">Sony</button>
          <ul class="dropdown-menu">
            <li><a class="dropdown-item" href="#">Tablet</a></li>
            <li><a class="dropdown-item" href="#">Smartphone</a></li>
          </ul>
        </div>
      </div></div>
    <br>
    <div class="container"></div>
    <br>
    <div class="container"></div>
    <br>
    <div class="container"></div>
    <br>
    <div class="container"></div>

    <script src="./js/bootstrap.bundle.min.js"></script>
</body>

</html>